<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
	<title>操作日志</title>
	<link rel="stylesheet" type="text/css" href="${s.base}/lib/layui/css/layui.css" />
	<link rel="stylesheet" type="text/css" href="${s.base}/css/base/index.css" />
</head>

<body>
<div class="wrap-container clearfix">
	<div class="column-content-detail padt10" >
		<form class="layui-form" action="">
			<div class="search-cont clearfix" id="tool">
				<div class="operation-btn-cont">
					<div class="operright cyt-retract-close hideMenu">
						收起筛选<i class="iconfont">&#xe658;</i>
					</div>
					<div class="operright cyt-retract-open showMenu" style="display: none;">
						展开筛选<i class="iconfont">&#xe936;</i>
					</div>
					<div class="triangle-bottom"></div>
					<div class="triangle-top"></div>
				</div>
				<div class="search-details">
					<div class="layui-form-item marb5">
						<div class="layui-inline">
							<label class="layui-form-label w75">模块名称：</label>
							<div class="layui-input-inline">
								<input type="text" name="moduleName" id="moduleName" placeholder="请输入模块名称" autocomplete="off" class="layui-input">
							</div>
						</div>
						<div class="layui-inline">
							<label class="layui-form-label w75">操作用户：</label>
							<div class="layui-input-inline">
								<input type="text" name="operatorId" id="operatorId" placeholder="请输入操作用户id" autocomplete="off" class="layui-input">
							</div>
						</div>
						<div class="layui-inline">
							<label class="layui-form-label w75">操作类别：</label>
							<div class="layui-input-inline">
								<select name="operatorType" id="operatorType">

								</select>
							</div>
						</div>
						<div class="layui-inline marl8">
							<button class="layui-btn layui-btn-normal" type="button" lay-submit="" lay-filter="seacherBtn">搜索</button>
							<button class="layui-btn layui-btn-normal" type="reset" >重置</button>
						</div>
					</div>
				</div>
			</div>
		</form>
		<div class="layui-form" id="table-list">
			<table id="entityList" lay-filter="entityList" class="cy-list-table"></table>
		</div>
	</div>
</div>
<!--操作-->
<script type="text/html" id="entityBar">
	<a class="layui-btn layui-btn-radius layui-btn-primary layui-btn-sm layui-smbtn-green"  lay-event="add">详情</a>
</script>
<script src="${s.base}/lib/layui/layui.js" type="text/javascript" charset="utf-8"></script>
<script src="${s.base}/js/common.js" type="text/javascript" charset="utf-8"></script>
<script>
    layui.use(['jquery','table','page'],function(){
        var $ = layui.jquery,
            table = layui.table,
            page = layui.page;
        var tableIns=null;
        page.initDict("base_status,operator_type,business_type",function (dictData) {
            page.showDict($("#status"),page.aceeptDictContentList(dictData,"base_status"),"全部");
            page.showDict($("#operatorType"),page.aceeptDictContentList(dictData,"operator_type"),"请选择操作类别");
            page.showDict($("#business_type"),page.aceeptDictContentList(dictData,"business_type"),"全部");
            var url="/baseLogUse/page";
            var cols=[
                {type: 'checkbox', fixed: 'left'},
                {type: 'numbers', title: '序号'},
                {field: 'moduleName', title: '模块',width:"120",align:'center'},
                {field: 'className', title: '类名称',align:'center' ,width:"120"},
                {field: 'methodName', title: '方法名称',align:'center',width:"120"},
                // {field: 'businessType', title: '业务类型',align:'center'},
                {field: 'businessType',width:"120", title: '业务类型',align:'center', templet:function(d){
                        if(d.businessType=="1"){
                            return '<a class="layui-btn layui-btn-warm layui-btn-xs layui-btn-danger">'+page.aceeptDictContentName(dictData,"business_type",d.businessType)+'</a>';
                        }else {
                            return '<a class="layui-btn layui-btn-xs layui-btn-danger">'+page.aceeptDictContentName(dictData,"business_type",d.businessType)+'</a>';
                        }
                    }},
                {field: 'method', title: '请求方法',align:'center',width:"150"},
                // {field: 'operatorType', title: '操作类别',align:'center'},
                {field: 'operatorType',width:"120", title: '操作类别',align:'center', templet:function(d){
                        if(d.operatorType=="1"){
                            return '<a class="layui-btn layui-btn-warm layui-btn-xs layui-btn-danger">'+page.aceeptDictContentName(dictData,"operator_type",d.operatorType)+'</a>';
                        }else {
                            return '<a class="layui-btn layui-btn-xs layui-btn-danger">'+page.aceeptDictContentName(dictData,"operator_type",d.operatorType)+'</a>';
                        }
                    }},
                {field: 'name', title: '操作用户名称',align:'center',width:"110"},
                {field: 'operUrl', title: '请求地址',align:'center',width:"120"},
                {field: 'operMac', title: 'MAC地址',align:'center',width:"160"},
                {field: 'operIp', title: '操作地点',align:'center',width:"140"},
                {field: 'operParam', title: '请求参数',align:'center',width:"120"},
                {field: 'status', title: '操作状态',align:'center', templet:function(d){
                        if(d.status=="1"){
                            return '<a class="layui-btn layui-btn-warm layui-btn-xs cy-btnbg-normal">'+page.aceeptDictContentName(dictData,"base_status",d.status)+'</a>';
                        }else {
                            return '<a class="layui-btn layui-btn-xs cy-btnbg-grey">'+page.aceeptDictContentName(dictData,"base_status",d.status)+'</a>';
                        }
                    }},
                {field: 'errorMsg', title: '错误消息',align:'center',width:"120"},
                {field: 'createTime',width:"200", title: '创建时间', align:'center', templet:function(d){
                        return new Date(d.createTime).Format("yyyy-MM-dd hh:mm:ss");
                    }},
                // {title: '操作',width:100, templet:'#entityBar',align:"center"}
            ];
            tableIns=page.initDate(cols,url);
        });

        //监听行工具事件
        // table.on('tool(entityList)', function(obj){
        //     var layEvent = obj.event,
        //         data = obj.data;
        //     if(layEvent === 'add'){ //字典
        //         page.edit("dictContentList","/baseDict/getDictContent?code="+data.code,"字典数据添加");
        //     }else if(layEvent === 'edit'){ //编辑
        //         page.edit("dictAddOrEdit","/baseDict/getEdit?id="+data.id,"字典类型编辑");
        //     }else if(layEvent === 'del'){ //删除
        //         page.delete("/baseRole/delete", {"id":data.id,"_method":"DELETE"},"确定删除角色【"+data.roleName+"】吗？",function (data) {
        //             tableIns.reload();
        //         });
        //     }
        // });
    });
</script>
</body>

</html>